package com.tisson.bo;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.tisson.view.DoorOpenRecordView;
import com.tisson.vo.DoorOpenRecordVO;

public class DoorOpenRecordBO {
	
	public List getAllDoorOpenRecord(){
		DoorOpenRecordView view = new DoorOpenRecordView();
		try{
			return view.findAll();
		}catch(Exception e){
			return new ArrayList();
		}
	}
	
	public List serachDoorOpenRecord(String userId, String doorId, String areaName,String districtName, String buildingName, String doorName,String depName, String userName, Integer openType,Date begin,Date end){
			DoorOpenRecordView view = new DoorOpenRecordView();
			DoorOpenRecordVO VO = new DoorOpenRecordVO(userId,doorId,areaName,districtName,buildingName,doorName,depName,userName,openType,null);
		try{
			return view.search(VO, begin, end);
		}catch(Exception e){
			return new ArrayList();
		}
	}

}
